package com.ygqh.baby.mapper;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.ygqh.baby.ao.QueryInfo;
import com.ygqh.baby.model.YgPromotionProductModel;
import com.ygqh.baby.po.YgProduct;
import com.ygqh.baby.po.YgProductActionGift;
import com.ygqh.baby.po.YgProductActionGiftExample;

public interface YgProductActionGiftMapper {
	int countByExample(YgProductActionGiftExample example);

	int deleteByExample(YgProductActionGiftExample example);

	int deleteByPrimaryKey(Long id);

	int insert(YgProductActionGift record);

	int insertSelective(YgProductActionGift record);

	List<YgProductActionGift> selectByExample(YgProductActionGiftExample example);

	YgProductActionGift selectByPrimaryKey(Long id);

	int updateByExampleSelective(@Param("record") YgProductActionGift record,
			@Param("example") YgProductActionGiftExample example);

	int updateByExample(@Param("record") YgProductActionGift record,
			@Param("example") YgProductActionGiftExample example);

	int updateByPrimaryKeySelective(YgProductActionGift record);

	int updateByPrimaryKey(YgProductActionGift record);

	int countSuper(@Param("q") String q, @Param("startDate") Date startDate, @Param("endDate") Date endDate);

	List<YgProductActionGift> selectSuper(@Param("queryInfo") QueryInfo queryInfo, @Param("q") String q,
			@Param("startDate") Date startDate, @Param("endDate") Date endDate);

	List<YgProduct> selectActionProduct(@Param("id") Long id);

	List<YgProduct> selectProductGift(@Param("id") Long id);

	YgProductActionGift findDetail(@Param("id") Long id);

	List<YgPromotionProductModel> selectSingleGiftList(@Param("productIds") List<Long> productIds);

	Boolean isHasSkuInSingleGiftProduct(@Param("pIds") List<Long> pIds, @Param("skuId") Long skuId);

	List<YgProductActionGift> selectActionGiftByGiftPId(@Param("pId") Long pId);

}
